home *** CD-ROM | disk | FTP | other *** search
- Path: queeg.apci.net!news
- From: Poconnor@apci.net (James O'Connor)
- Newsgroups: comp.lang.c++
- Subject: Re: assembler in borland C 4.5
- Date: 3 Jan 1996 12:52:46 GMT
- Organization: Applied Personal Computing, Inc.
- Message-ID: <4cdu6u$ou4@queeg.apci.net>
- References: <4cccb4$6kg@news1.usa.pipeline.com>
- Reply-To: oconnor@apci.net
- NNTP-Posting-Host: dialup14.apci.net
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4cccb4$6kg@news1.usa.pipeline.com>, grantp@usa.pipeline.com(Pete) writes:
- >On Jan 02, 1996 14:08:40 in article <assembler in borland C 4.5>, 'Per
- >Wiberg <e95_pwi@elixir.e.kth.se>' wrote:
- >
- >
- >>Well.. I got a CD with a lot of programs from my school (KTH in
- >>stockholm) and among them BC4.5. AND no manual, reference-book or
- >>anything!.
- >>"lucky-me" I've got no CD-ROM drive! ... so I made my friend raw-copy
- >>BC4.5 on to floppy's (bad idea!). And here I am with a silly question:
- >>
- >Hmm, I don'w see what the above has to do with the question.
- >
- >>- how do you include assembler code in BC4.5 ?
- >
- >If you mean inline assembly (which is only a subset of ASM), it goes
- >something like this:
- >
- >int Foo (int n)
- > {
- > asm {
- > mov ax,n
- > add ax,5
- > }
- > }
- >
- >Some not-so-apparent rules are:
- > the enclosed braces (at least the first one) must be on a line
- > that doesn't contain any ASM directives.
- > There's restrictions on comments. I don't remember the rules
- >but to be safe, don't use any.
- >If you make errors, the compiler sometimes reports errors in
- >a completely different place from the actual error and the message
- >is gobbdleygook -- moral: Don't make any errors in your asm code. :-)
- >
- >--
- >
- >Pete
- Uh....if we never made erroes in asm code, would we need high order languages
- like C, C++, Smalltalk, etc...?
-
- James O'Connor
- Framework Technologies
- oconnor@apci.net
-
- "If your nose runs and your feet smell,
- you're built upside down"
-
-